package cn.hdu.liang.appb;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CollectionPlus {
    private static Map<String, String> map = new HashMap<>();

    public static void main(String[] args) {


    }

    public static void mapPlus() {
        map.put("a", "1");
        map.put("b", "2");
        map.put("c", "3");

        String d = map.getOrDefault("d", "4");
    }

    public static void listPlus() {
        List<Integer> nums = Arrays.asList(1, 2, 3, 4, 5);
        nums.replaceAll(x -> x * 2);
        System.out.println(nums);
    }

}
